package week05.day02;

/**
 * 通过打擂台算法找出数组的最值
 */

public class 数组的最值 {
    public static void main(String[] args) {
        int[] arr = {1234,214,124,214,124,2314,123,3123,13,312,124,3};
        int small = arr[0];//初始化擂主数值 设擂主为第一个
        for (int i=0;i<=arr.length-1;i++){
            if (small>arr[i]){
                small = arr[i];
            }
        }
        System.out.println("最小值为"+small);
    }
}
